Drizzling WFPC2 Images to use a Single Zeropoint

Note: The notebook in this repository 'Initialization.ipynb' goes over many of the basic concepts such as the setup of the environment/package installation and should be read first if you are new to HST images, DrizzlePac, or Astroquery.

Introduction

Extra care must be taken when using AstroDrizzle to combine observations from detectors comprised of multiple chips of varying sensitivity. AstroDrizzle works with calibrated images in units of counts (electrons or Data Numbers) or count rates and not in units of flux. It assumes that all input frames can be converted to physical flux units using a single inverse-sensitivity factor, recorded in the FITS image headers as PHOTFLAM, and the output drizzled product simply copies the PHOTFLAM keyword value from the first input image. When this occurs, the inverse-sensitivity will vary across the final drizzled product, and users will need to keep track of which sources fell on which chip when doing photometry. Moreover, varying detector sensitivities will affect the cosmic-ray rejection algorithm used by AstroDrizzle, and this may result in the misidentification of some good pixels as cosmic rays.

This is a typical situation when drizzle-combining images from HST instruments with different chip sensitivities, e.g. Wide Field and Planetary Camera 2 (WFPC2). For more detail, see the section on Gain Variation under 'Position-Dependent Photometric Corrections' in the WFPC2 Data Handbook. As a result, each of the four chips requires a unique PHOTFLAM header keyword value. A similar situation may occur when drizzle-combining observations taken over a span of several years as detector's sensitivity declines over time, see e.g. ACS ISR 2016-03.

One approach is to rescale the input data so that AstroDrizzle can properly assume the images/chips have the same sensitivity; that is, a single PHOTFLAM value can be used to convert re-scaled image counts (or count-rates) to physical integrated flux units. The photeq task in Drizzlepac automates this image intensity rescaling to a single inverse-sensitivity factor PHOTFLAM.

In this example notebook, archival WFPC2 images are used to demonstrate advanced reprocessing using TweakReg and AstroDrizzle for alignment and image combination. The notebook is based on a prior WFPC2 example but includes additional information about equalizing the chip sensitivities prior to combining.

NOTE: It is important to note that photeq only adjusts image counts so that integrated physical fluxes can be obtained using a single PHOTFLAM. It does nothing to account for different throughtputs at different wavelengths.

In [1]:
import shutil
import glob
import os
import subprocess

import matplotlib.pyplot as plt
from astropy.io import fits

from astroquery.mast import Observations
from stwcs.updatewcs import updatewcs
from drizzlepac import tweakreg, astrodrizzle, photeq
from stsci.skypac import skymatch

# ONLY needed for the simulation section:
import numpy as np
from stwcs.wcsutil import HSTWCS
from drizzlepac.wfpc2Data import WFPC2_GAINS

%matplotlib inline
The following task in the stsci.skypac package can be run with TEAL:
                                    skymatch                                    
The following tasks in the drizzlepac package can be run with TEAL:
    astrodrizzle       imagefindpars           mapreg              photeq       
     pixreplace           pixtopix            pixtosky        refimagefindpars  
     resetbits          runastrodriz          skytopix           tweakback      
      tweakreg           updatenpol

1. Download the Data

This example uses WFPC2 observations of Messier 2 in the F814W filter. The data come from GO proposal 11100 "Two new 'bullets' for MOND: revealing the properties of dark matter in massive merging clusters". Four images were acquired using a 4-pt dither box pattern, followed by two images offset with a dither-line pattern.

The data are downloaded using the astroquery API to access the MAST archive. The astroquery.mast documentation has more examples for how to find and download data from MAST.

In [2]:
# Retrieve the observation information.
if os.path.isdir('mastDownload'):
    shutil.rmtree('mastDownload')
obs_table = Observations.query_criteria(obs_id='ua0605*', filters='F814W', obstype='ALL')
products = Observations.get_product_list(obs_table)

# Download only the ua0605*_c0m.fits and ua0605*_c1m.fits (DQ) images:
Observations.download_products(products, mrp_only=False, productSubGroupDescription=['C0M', 'C1M'], extension='fits')

# Move the files from the mastDownload directory to the current working
# directory and make a backup of the files.
fits_files = glob.glob('mastDownload/HST/ua*/ua*c?m.fits')
for fil in fits_files:
    base_name = os.path.basename(fil)
    if os.path.isfile(base_name):
        os.remove(base_name)
    shutil.move(fil, '.')
    
# Delete the mastDownload directory and all subdirectories it contains.
shutil.rmtree('mastDownload')
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060502m_c0m.fits to ./mastDownload/HST/ua060502m/ua060502m_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060502m_c1m.fits to ./mastDownload/HST/ua060502m/ua060502m_c1m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060504m_c0m.fits to ./mastDownload/HST/ua060504m/ua060504m_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060504m_c1m.fits to ./mastDownload/HST/ua060504m/ua060504m_c1m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060506m_c0m.fits to ./mastDownload/HST/ua060506m/ua060506m_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060506m_c1m.fits to ./mastDownload/HST/ua060506m/ua060506m_c1m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060508m_c0m.fits to ./mastDownload/HST/ua060508m/ua060508m_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua060508m_c1m.fits to ./mastDownload/HST/ua060508m/ua060508m_c1m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua06050am_c0m.fits to ./mastDownload/HST/ua06050am/ua06050am_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua06050am_c1m.fits to ./mastDownload/HST/ua06050am/ua06050am_c1m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua06050cm_c0m.fits to ./mastDownload/HST/ua06050cm/ua06050cm_c0m.fits ... [Done]
Downloading URL https://mast.stsci.edu/api/v0.1/Download/file?uri=mast:HST/product/ua06050cm_c1m.fits to ./mastDownload/HST/ua06050cm/ua06050cm_c1m.fits ... [Done]

2. Update the WCS

WFPC2 images downloaded from the archive contain World Coordinate System (WCS) information based on an older-style description of image distortions. Before these images can be processed with drizzlepac, their WCS must be converted to a new format. This can be achieved using updatewcs() function from the stwcs package. More details may be found here: 'Making WFPC2 Images Compatible with AstroDrizzle'. Note that updatewcs is no longer a parameter in AstroDrizzle or TweakReg and must be run separately before processing the data.

First we download the reference files from the CRDS website. See the initialization notebook in this repository for more information.

In [3]:
os.environ['CRDS_SERVER_URL'] = 'https://hst-crds.stsci.edu'
os.environ['CRDS_PATH'] = os.path.abspath(os.path.join('.', 'reference_files'))

subprocess.check_output('crds bestrefs --files ua0605*_c0m.fits --sync-references=1 --update-bestrefs', shell=True, stderr=subprocess.DEVNULL)

os.environ['uref'] = os.path.abspath(os.path.join('.', 'reference_files', 'references', 'hst', 'wfpc2')) + os.path.sep

NOTE: This next step may raise warnings because the Astrometry database is in progress and currently does not cover the entire sky. Please ignore these warnings. The WCS will still be updated.

In [4]:
updatewcs('ua*c0m.fits', use_db=True)
WARNING : AstrometryDB service inaccessible!
    AstrometryDB called: https://mastdev.stsci.edu/portal/astrometryDB/
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
- OFFTAB: Offset interpolated from rows 30 and 34
<<<<<<< HEAD
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
=======
>>>>>>> upstream/gh-pages
AstrometryDB not available.
<<<<<<< HEAD
NO Updates performed for ua06050cm
Problems getting solutions from database
 NO Updates performed for ua06050cm
=======
NO Updates performed for ua060508m
Problems getting solutions from database
 NO Updates performed for ua060508m
>>>>>>> upstream/gh-pages
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
- OFFTAB: Offset interpolated from rows 30 and 34
<<<<<<< HEAD
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
AstrometryDB not available.
NO Updates performed for ua060502m
Problems getting solutions from database
 NO Updates performed for ua060502m
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
=======
AstrometryDB not available.
NO Updates performed for ua06050cm
Problems getting solutions from database
 NO Updates performed for ua06050cm
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
>>>>>>> upstream/gh-pages
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
- OFFTAB: Offset interpolated from rows 30 and 34
<<<<<<< HEAD
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
AstrometryDB not available.
NO Updates performed for ua06050am
Problems getting solutions from database
 NO Updates performed for ua06050am
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
=======
AstrometryDB not available.
NO Updates performed for ua060506m
Problems getting solutions from database
 NO Updates performed for ua060506m
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
>>>>>>> upstream/gh-pages
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
- OFFTAB: Offset interpolated from rows 30 and 34
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
AstrometryDB not available.
<<<<<<< HEAD
NO Updates performed for ua060506m
Problems getting solutions from database
 NO Updates performed for ua060506m
=======
NO Updates performed for ua060504m
Problems getting solutions from database
 NO Updates performed for ua060504m
>>>>>>> upstream/gh-pages
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
- OFFTAB: Offset interpolated from rows 30 and 34
<<<<<<< HEAD
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
=======
>>>>>>> upstream/gh-pages
AstrometryDB not available.
<<<<<<< HEAD
NO Updates performed for ua060508m
Problems getting solutions from database
 NO Updates performed for ua060508m
=======
NO Updates performed for ua06050am
Problems getting solutions from database
 NO Updates performed for ua06050am
>>>>>>> upstream/gh-pages
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 122 for chip 1 : F814W
- OFFTAB: Offset interpolated from rows 29 and 33
- IDCTAB: Distortion model from row 288 for chip 2 : F814W
AstrometryDB not available.
<<<<<<< HEAD
NO Updates performed for ua060504m
Problems getting solutions from database
 NO Updates performed for ua060504m
=======
NO Updates performed for ua060502m
Problems getting solutions from database
 NO Updates performed for ua060502m
>>>>>>> upstream/gh-pages
- OFFTAB: Offset interpolated from rows 30 and 34
- IDCTAB: Distortion model from row 454 for chip 3 : F814W
- OFFTAB: Offset interpolated from rows 31 and 35
- IDCTAB: Distortion model from row 620 for chip 4 : F814W
- OFFTAB: Offset interpolated from rows 32 and 36
Out[4]:
<<<<<<< HEAD
['ua06050cm_c0m.fits',
 'ua060502m_c0m.fits',
 'ua06050am_c0m.fits',
 'ua060506m_c0m.fits',
 'ua060508m_c0m.fits',
 'ua060504m_c0m.fits']
=======
['ua060508m_c0m.fits',
 'ua06050cm_c0m.fits',
 'ua060506m_c0m.fits',
 'ua060504m_c0m.fits',
 'ua06050am_c0m.fits',
 'ua060502m_c0m.fits']
>>>>>>> upstream/gh-pages

Backup an Image

In a later section we will generate simulated data to illustrate the effects of drizzling WFPC2 images without sensitivity equalization. For that purpose we will need a copy of an original image that has the original inverse-sensitivity values (PHOTFLAM) in their headers. Here we create a backup copy of the first image.

NOTE: This step is needed for illustration purpose in this notebook only. It is not needed when processing data.

In [5]:
orig_image = glob.glob('ua*c0m.fits')[0]
backup_image = 'simulation.fits'
if os.path.isfile(backup_image):
    os.remove(backup_image)
shutil.copy2(orig_image, backup_image)
Out[5]:
'simulation.fits'

3. Align the Images

Due to small pointing errors, the image header WCS typically needs to be updated in order to achieve the best drizzle-combined products. The expected pointing accuracy for various observing scenerios is summarized in the DrizzlePac Handbook Appendix B. Input images must first be aligned so that when the coordinates of a given object (in detector space) are converted to sky coordinates (using the WCS), that object's sky coordinates must be approximately equal in each frame.

The DrizzlePac task TweakReg may be used to correct for any errors in the image header WCS. First, TweakReg finds sources in each image, matches sources in common across images, and finds a separate linear transformation to align each image. TweakReg then computes a new WCS for each image based on this linear transformation.

Here we show a basic image alignment procedure. For a more detailed illustration of image alignment, please refer to other example notebooks such as the mosaic example in this repository.

In [6]:
tweakreg.TweakReg('ua*c0m.fits', updatehdr=True, reusename=True, interactive=False,
                  conv_width=3.0, threshold=300.0, peakmin=100, peakmax=10000)
Setting up logfile :  tweakreg.log
<<<<<<< HEAD
TweakReg Version 1.4.7(18-April-2018) started at: 19:37:22.886 (26/03/2019) 
=======
TweakReg Version 1.4.7(18-April-2018) started at: 14:26:58.680 (30/04/2019) 
>>>>>>> upstream/gh-pages

Version Information
--------------------
Python Version [GCC 7.3.0]
3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) 
<<<<<<< HEAD
numpy Version -> 1.16.2 
=======
numpy Version -> 1.15.4 
>>>>>>> upstream/gh-pages
astropy Version -> 3.1.2 
stwcs Version -> 1.4.2 

Finding shifts for: 
<<<<<<< HEAD
    ua06050cm_c0m.fits
    ua060502m_c0m.fits
    ua06050am_c0m.fits
    ua060506m_c0m.fits
    ua060508m_c0m.fits
    ua060504m_c0m.fits

===  Source finding for image 'ua06050cm_c0m.fits':
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 1) started at: 19:37:23.001 (26/03/2019)
     Found 30 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 2) started at: 19:37:23.092 (26/03/2019)
     Found 67 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 3) started at: 19:37:23.186 (26/03/2019)
     Found 512 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 4) started at: 19:37:23.347 (26/03/2019)
     Found 282 objects.
===  FINAL number of objects in image 'ua06050cm_c0m.fits': 891

===  Source finding for image 'ua060502m_c0m.fits':
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 1) started at: 19:37:23.82 (26/03/2019)
     Found 14 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 2) started at: 19:37:23.904 (26/03/2019)
     Found 83 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 3) started at: 19:37:23.995 (26/03/2019)
     Found 304 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 4) started at: 19:37:24.111 (26/03/2019)
     Found 116 objects.
===  FINAL number of objects in image 'ua060502m_c0m.fits': 517

===  Source finding for image 'ua06050am_c0m.fits':
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 1) started at: 19:37:24.556 (26/03/2019)
     Found 26 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 2) started at: 19:37:24.640 (26/03/2019)
     Found 187 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 3) started at: 19:37:24.73 (26/03/2019)
     Found 301 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 4) started at: 19:37:24.85 (26/03/2019)
     Found 130 objects.
===  FINAL number of objects in image 'ua06050am_c0m.fits': 644

===  Source finding for image 'ua060506m_c0m.fits':
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 1) started at: 19:37:25.259 (26/03/2019)
     Found 19 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 2) started at: 19:37:25.344 (26/03/2019)
     Found 76 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 3) started at: 19:37:25.43 (26/03/2019)
     Found 241 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 4) started at: 19:37:25.571 (26/03/2019)
     Found 105 objects.
===  FINAL number of objects in image 'ua060506m_c0m.fits': 441

===  Source finding for image 'ua060508m_c0m.fits':
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 1) started at: 19:37:26.000 (26/03/2019)
     Found 15 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 2) started at: 19:37:26.083 (26/03/2019)
     Found 130 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 3) started at: 19:37:26.176 (26/03/2019)
     Found 280 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 4) started at: 19:37:26.3 (26/03/2019)
     Found 411 objects.
===  FINAL number of objects in image 'ua060508m_c0m.fits': 836

===  Source finding for image 'ua060504m_c0m.fits':
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 1) started at: 19:37:26.766 (26/03/2019)
     Found 13 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 2) started at: 19:37:26.863 (26/03/2019)
     Found 75 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 3) started at: 19:37:26.953 (26/03/2019)
     Found 407 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 4) started at: 19:37:27.093 (26/03/2019)
     Found 237 objects.
===  FINAL number of objects in image 'ua060504m_c0m.fits': 732
=======
    ua060508m_c0m.fits
    ua06050cm_c0m.fits
    ua060506m_c0m.fits
    ua060504m_c0m.fits
    ua06050am_c0m.fits
    ua060502m_c0m.fits

===  Source finding for image 'ua060508m_c0m.fits':
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 1) started at: 14:26:58.762 (30/04/2019)
     Found 15 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 2) started at: 14:26:58.841 (30/04/2019)
     Found 130 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 3) started at: 14:26:58.980 (30/04/2019)
     Found 280 objects.
  #  Source finding for 'ua060508m_c0m.fits', EXT=('SCI', 4) started at: 14:26:59.200 (30/04/2019)
     Found 411 objects.
===  FINAL number of objects in image 'ua060508m_c0m.fits': 836

===  Source finding for image 'ua06050cm_c0m.fits':
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 1) started at: 14:26:59.685 (30/04/2019)
     Found 30 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 2) started at: 14:26:59.782 (30/04/2019)
     Found 67 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 3) started at: 14:26:59.912 (30/04/2019)
     Found 512 objects.
  #  Source finding for 'ua06050cm_c0m.fits', EXT=('SCI', 4) started at: 14:27:00.137 (30/04/2019)
     Found 282 objects.
===  FINAL number of objects in image 'ua06050cm_c0m.fits': 891

===  Source finding for image 'ua060506m_c0m.fits':
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 1) started at: 14:27:00.685 (30/04/2019)
     Found 19 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 2) started at: 14:27:00.756 (30/04/2019)
     Found 76 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 3) started at: 14:27:00.912 (30/04/2019)
     Found 241 objects.
  #  Source finding for 'ua060506m_c0m.fits', EXT=('SCI', 4) started at: 14:27:01.132 (30/04/2019)
     Found 105 objects.
===  FINAL number of objects in image 'ua060506m_c0m.fits': 441

===  Source finding for image 'ua060504m_c0m.fits':
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 1) started at: 14:27:01.631 (30/04/2019)
     Found 13 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 2) started at: 14:27:01.70 (30/04/2019)
     Found 75 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 3) started at: 14:27:01.876 (30/04/2019)
     Found 407 objects.
  #  Source finding for 'ua060504m_c0m.fits', EXT=('SCI', 4) started at: 14:27:02.0 (30/04/2019)
     Found 237 objects.
===  FINAL number of objects in image 'ua060504m_c0m.fits': 732

===  Source finding for image 'ua06050am_c0m.fits':
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 1) started at: 14:27:02.566 (30/04/2019)
     Found 26 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 2) started at: 14:27:02.692 (30/04/2019)
     Found 187 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 3) started at: 14:27:02.826 (30/04/2019)
     Found 301 objects.
  #  Source finding for 'ua06050am_c0m.fits', EXT=('SCI', 4) started at: 14:27:03.013 (30/04/2019)
     Found 130 objects.
===  FINAL number of objects in image 'ua06050am_c0m.fits': 644

===  Source finding for image 'ua060502m_c0m.fits':
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 1) started at: 14:27:03.447 (30/04/2019)
     Found 14 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 2) started at: 14:27:03.584 (30/04/2019)
     Found 83 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 3) started at: 14:27:03.722 (30/04/2019)
     Found 304 objects.
  #  Source finding for 'ua060502m_c0m.fits', EXT=('SCI', 4) started at: 14:27:03.938 (30/04/2019)
     Found 116 objects.
===  FINAL number of objects in image 'ua060502m_c0m.fits': 517
>>>>>>> upstream/gh-pages


===============================================================
Performing alignment in the projection plane defined by the WCS
<<<<<<< HEAD
derived from 'ua06050cm_c0m.fits'
=======
derived from 'ua060508m_c0m.fits'
>>>>>>> upstream/gh-pages
===============================================================


====================
<<<<<<< HEAD
Performing fit for: ua060502m_c0m.fits

Matching sources from 'ua060502m_c0m.fits' with sources from reference image 'ua06050cm_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.8261729281027108 -0.646685748615532
    with significance of  380.0966160070358 and  19.0  matches
Found 36 matches for ua060502m_c0m.fits...
Computed  rscale  fit for  ua060502m_c0m.fits : 
XSH: -0.0675  YSH: 0.0543    ROT: 0.0001936586831    SCALE: 1.000109
XRMS: 0.2    YRMS: 0.17

RMS_RA: 1.6e-06 (deg)   RMS_DEC: 2.9e-06 (deg)

Final solution based on  35  objects.
wrote XY data to:  ua060502m_c0m_catalog_fit.match
Total # points:  35
# of points after clipping:  35
Total # points:  35
# of points after clipping:  35
Initializing new WCSCORR table for  ua060502m_c0m.fits

....Updating header for ua060502m_c0m.fits...


Processing ua060502m_c0m.fits['SCI',1]

Updating header for ua060502m_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.461533626141922e-06 -1.2408354762199252e-05
CD_21  CD_22: -1.2409950575858332e-05 -2.4759976294326194e-06
CRVAL    : 323.31471456854973 -0.8710676948968019
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555116863410184
ORIENTAT : -101.28474116347695
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',2]

Updating header for ua060502m_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.7090055105900962e-05 -5.6483409357028905e-06
CD_21  CD_22: -5.64601754988533e-06 2.7086745199288532e-05
CRVAL    : 323.30598225990997 -0.8567773746745685
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.099630670803459
ORIENTAT : -11.778970296347707
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',3]

Updating header for ua060502m_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.500831496392938e-06 2.7114946462733627e-05
CD_21  CD_22: 2.7114244804713483e-05 5.497370790107129e-06
CRVAL    : 323.3264181547366 -0.8527838313655024
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09961068533848494
ORIENTAT : 78.53901937693956
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',4]

Updating header for ua060502m_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.7180411167379936e-05 5.240020079348554e-06
CD_21  CD_22: 5.234924518194155e-06 -2.7185065711256824e-05
CRVAL    : 323.3306367005598 -0.8736919525784518
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965867839434511
ORIENTAT : 169.08983588446955
=======
Performing fit for: ua06050cm_c0m.fits

Matching sources from 'ua06050cm_c0m.fits' with sources from reference image 'ua060508m_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.8556126242090691 -0.4852422538386989
    with significance of  380.52913298804276 and  16.0  matches
Found 40 matches for ua06050cm_c0m.fits...
Computed  rscale  fit for  ua06050cm_c0m.fits : 
XSH: -0.0888  YSH: -0.0602    ROT: 359.9993447    SCALE: 0.999951
XRMS: 0.17    YRMS: 0.2

RMS_RA: 2.1e-06 (deg)   RMS_DEC: 2.6e-06 (deg)

Final solution based on  36  objects.
wrote XY data to:  ua06050cm_c0m_catalog_fit.match
Total # points:  36
# of points after clipping:  36
Total # points:  36
# of points after clipping:  36
Initializing new WCSCORR table for  ua06050cm_c0m.fits

....Updating header for ua06050cm_c0m.fits...


Processing ua06050cm_c0m.fits['SCI',1]

Updating header for ua06050cm_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.462002528013058e-06 -1.2409754931364088e-05
CD_21  CD_22: -1.2411351113430011e-05 -2.47646824128212e-06
CRVAL    : 323.31499119644286 -0.8703842598923728
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04554921252570859
ORIENTAT : -101.28559020771453
WCSNAME  :  TWEAK

Processing ua06050cm_c0m.fits['SCI',2]

Updating header for ua06050cm_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.709310840888362e-05 -5.649396380563889e-06
CD_21  CD_22: -5.647072817529776e-06 2.7089798043505737e-05
CRVAL    : 323.30625766640617 -0.8560924142847997
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962639245346323
ORIENTAT : -11.779819241825614
WCSNAME  :  TWEAK

Processing ua06050cm_c0m.fits['SCI',3]

Updating header for ua06050cm_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.501870179017975e-06 2.7118004908523637e-05
CD_21  CD_22: 2.7117303025807353e-05 5.498409128702862e-06
CRVAL    : 323.3266958648181 -0.8520981057490189
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960640775906755
ORIENTAT : 78.53817055813334
WCSNAME  :  TWEAK

Processing ua06050cm_c0m.fits['SCI',4]

Updating header for ua06050cm_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.7183480979568803e-05 5.241029632810699e-06
CD_21  CD_22: 5.2359334017671176e-06 -2.7188136022011855e-05
CRVAL    : 323.3309152081877 -0.8730085855634145
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965439873691254
ORIENTAT : 169.08898708576538
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

====================
Performing fit for: ua06050am_c0m.fits

<<<<<<< HEAD
Matching sources from 'ua06050am_c0m.fits' with sources from reference image 'ua06050cm_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.17660027853006 -0.8877113896411721
    with significance of  303.3376242501321 and  11.0  matches
Found 32 matches for ua06050am_c0m.fits...
Computed  rscale  fit for  ua06050am_c0m.fits : 
XSH: 0.0462  YSH: 0.0506    ROT: 0.0003457394305    SCALE: 1.000034
XRMS: 0.093    YRMS: 0.19

RMS_RA: 2.1e-06 (deg)   RMS_DEC: 1.6e-06 (deg)

Final solution based on  28  objects.
wrote XY data to:  ua06050am_c0m_catalog_fit.match
Total # points:  28
# of points after clipping:  28
Total # points:  28
# of points after clipping:  28
Initializing new WCSCORR table for  ua06050am_c0m.fits
=======
Matching sources from 'ua060506m_c0m.fits' with sources from reference image 'ua060508m_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.766878056307835 -0.07937805630783501
    with significance of  336.94880916839577 and  14.0  matches
Found 38 matches for ua060506m_c0m.fits...
Computed  rscale  fit for  ua060506m_c0m.fits : 
XSH: -0.0632  YSH: 0.1795    ROT: 359.9957443    SCALE: 1.000035
XRMS: 0.13    YRMS: 0.15

RMS_RA: 1.6e-06 (deg)   RMS_DEC: 2e-06 (deg)

Final solution based on  34  objects.
wrote XY data to:  ua060506m_c0m_catalog_fit.match
Total # points:  34
# of points after clipping:  34
Total # points:  34
# of points after clipping:  34
Initializing new WCSCORR table for  ua060506m_c0m.fits
>>>>>>> upstream/gh-pages

....Updating header for ua06050am_c0m.fits...


Processing ua06050am_c0m.fits['SCI',1]

Updating header for ua06050am_c0m.fits[1]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: 2.4615895707843452e-06 -1.2408809622850425e-05
CD_21  CD_22: -1.2410405355435971e-05 -2.4760541491494813e-06
CRVAL    : 323.3147630605276 -0.8709927002623659
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04554940414591529
ORIENTAT : -101.28458909969125
=======
CD_11  CD_12: 2.4626369265606044e-06 -1.2408856480196258e-05
CD_21  CD_22: -1.2410453462612613e-05 -2.477101583115746e-06
CRVAL    : 323.315419637159 -0.8700082752256438
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555034216237082
ORIENTAT : -101.28919866347134
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua06050am_c0m.fits['SCI',2]

Updating header for ua06050am_c0m.fits[2]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: -2.7091048591457615e-05 -5.648472999328625e-06
CD_21  CD_22: -5.6461495749741324e-06 2.7087738583735726e-05
CRVAL    : 323.3060304745773 -0.8567018406824034
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962681151551943
ORIENTAT : -11.778818095924517
=======
CD_11  CD_12: -2.7091131627409166e-05 -5.650764448321938e-06
CD_21  CD_22: -5.6484411901586e-06 2.708782134372846e-05
CRVAL    : 323.30668573037667 -0.855717834719408
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962886308997655
ORIENTAT : -11.783427906023038
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua06050am_c0m.fits['SCI',3]

Updating header for ua06050am_c0m.fits[3]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: -5.500958185782302e-06 2.7115940498317592e-05
CD_21  CD_22: 2.7115238801812157e-05 5.497497390494207e-06
CRVAL    : 323.3264671177692 -0.8527082073630452
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960682680751902
ORIENTAT : 78.53917145974309
=======
CD_11  CD_12: -5.50324866274564e-06 2.7116036032816605e-05
CD_21  CD_22: 2.711533399315147e-05 5.499787886304136e-06
CRVAL    : 323.3271224523095 -0.8517224781873287
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960887789026077
ORIENTAT : 78.53456214033615
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua06050am_c0m.fits['SCI',4]

Updating header for ua06050am_c0m.fits[4]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: 2.718140675696183e-05 5.240137131431301e-06
CD_21  CD_22: 5.235041448328582e-06 -2.718606159771396e-05
CRVAL    : 323.33068576038033 -0.8736170949953851
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996548178526407
ORIENTAT : 169.0899881022119
WCSNAME  :  TWEAK

====================
Performing fit for: ua060506m_c0m.fits

Matching sources from 'ua060506m_c0m.fits' with sources from reference image 'ua06050cm_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.6753082888659776 -0.09391294002876904
    with significance of  342.67019659778356 and  15.0  matches
Found 37 matches for ua060506m_c0m.fits...
Computed  rscale  fit for  ua060506m_c0m.fits : 
XSH: 0.0867  YSH: 0.2208    ROT: 359.9990708    SCALE: 1.000108
XRMS: 0.17    YRMS: 0.15

RMS_RA: 1.4e-06 (deg)   RMS_DEC: 2.5e-06 (deg)

Final solution based on  36  objects.
wrote XY data to:  ua060506m_c0m_catalog_fit.match
Total # points:  36
# of points after clipping:  36
Total # points:  36
# of points after clipping:  36
Initializing new WCSCORR table for  ua060506m_c0m.fits

....Updating header for ua060506m_c0m.fits...


Processing ua060506m_c0m.fits['SCI',1]

Updating header for ua060506m_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.46173705633616e-06 -1.2408096421836355e-05
CD_21  CD_22: -1.2409692461474248e-05 -2.476200763601621e-06
CRVAL    : 323.31541970550643 -0.8700057371959814
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555034216237082
ORIENTAT : -101.2858721582226
WCSNAME  :  TWEAK

Processing ua060506m_c0m.fits['SCI',2]

Updating header for ua060506m_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.7089486287447834e-05 -5.648780240009327e-06
CD_21  CD_22: -5.646457006037571e-06 2.7086176354740738e-05
CRVAL    : 323.30668726461874 -0.8557158305892855
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962886308997655
ORIENTAT : -11.780101296426542
WCSNAME  :  TWEAK

Processing ua060506m_c0m.fits['SCI',3]

Updating header for ua060506m_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.501273628575149e-06 2.711438022427597e-05
CD_21  CD_22: 2.7113678460745175e-05 5.497813062678159e-06
CRVAL    : 323.3271227299472 -0.8517219513959219
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960887789026077
ORIENTAT : 78.53788869797583
WCSNAME  :  TWEAK

Processing ua060506m_c0m.fits['SCI',4]

Updating header for ua060506m_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.7179848918622134e-05 5.240467975164426e-06
CD_21  CD_22: 5.235372483848224e-06 -2.7184503330341845e-05
CRVAL    : 323.33134161600856 -0.8726296363779237
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996568700276385
ORIENTAT : 169.08870540444664
=======
CD_11  CD_12: 2.7181524656484137e-05 5.2424281522124406e-06
CD_21  CD_22: 5.2373320006074334e-06 -2.7186179205055116e-05
CRVAL    : 323.33134285979594 -0.872631441150661
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996568700276385
ORIENTAT : 169.08537879814597
WCSNAME  :  TWEAK

====================
Performing fit for: ua060504m_c0m.fits

Matching sources from 'ua060504m_c0m.fits' with sources from reference image 'ua060508m_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.8018356834264786 -0.954378056307835
    with significance of  379.7156232570034 and  19.0  matches
Found 40 matches for ua060504m_c0m.fits...
Computed  rscale  fit for  ua060504m_c0m.fits : 
XSH: -0.0733  YSH: 0.0019    ROT: 359.9999107    SCALE: 1.000056
XRMS: 0.15    YRMS: 0.15

RMS_RA: 1.5e-06 (deg)   RMS_DEC: 2.2e-06 (deg)

Final solution based on  35  objects.
wrote XY data to:  ua060504m_c0m_catalog_fit.match
Total # points:  35
# of points after clipping:  35
Total # points:  35
# of points after clipping:  35
Initializing new WCSCORR table for  ua060504m_c0m.fits

....Updating header for ua060504m_c0m.fits...


Processing ua060504m_c0m.fits['SCI',1]

Updating header for ua060504m_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.461708178028732e-06 -1.240891342414175e-05
CD_21  CD_22: -1.2410509284264588e-05 -2.4761728446924425e-06
CRVAL    : 323.3149431652139 -0.8704572791755802
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555083662190098
ORIENTAT : -101.28502419309734
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',2]

Updating header for ua060504m_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.709127335954527e-05 -5.6487345415855035e-06
CD_21  CD_22: -5.646411131470768e-06 2.7087963290316868e-05
CRVAL    : 323.30621038567125 -0.8561663447154039
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996299446720908
ORIENTAT : -11.77925326962234
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',3]

Updating header for ua060504m_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.501218370168091e-06 2.711616670185612e-05
CD_21  CD_22: 2.7115464925954286e-05 5.497757557222354e-06
CRVAL    : 323.3266471975976 -0.8521725167687699
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960995931780645
ORIENTAT : 78.53873651481378
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',4]

Updating header for ua060504m_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.718163561094713e-05 5.240395293895324e-06
CD_21  CD_22: 5.2352995264970015e-06 -2.7186290437555903e-05
CRVAL    : 323.33086604004274 -0.8730815789579104
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965795192213613
ORIENTAT : 169.08955314017084
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

====================
Performing fit for: ua060508m_c0m.fits

<<<<<<< HEAD
Matching sources from 'ua060508m_c0m.fits' with sources from reference image 'ua06050cm_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.8432669451967278 -0.830921266184383
    with significance of  332.7221062688802 and  11.0  matches
Found 40 matches for ua060508m_c0m.fits...
Computed  rscale  fit for  ua060508m_c0m.fits : 
XSH: -0.0624  YSH: -0.2005    ROT: 0.002050169794    SCALE: 0.999885
XRMS: 0.27    YRMS: 0.41

RMS_RA: 4.4e-06 (deg)   RMS_DEC: 4.4e-06 (deg)

Final solution based on  38  objects.
wrote XY data to:  ua060508m_c0m_catalog_fit.match
Total # points:  38
# of points after clipping:  38
Total # points:  38
# of points after clipping:  38
Initializing new WCSCORR table for  ua060508m_c0m.fits
=======
Matching sources from 'ua06050am_c0m.fits' with sources from reference image 'ua060508m_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.704378056307835 -0.8793780563078357
    with significance of  293.85832349231544 and  10.0  matches
Found 30 matches for ua06050am_c0m.fits...
Computed  rscale  fit for  ua06050am_c0m.fits : 
XSH: -0.0161  YSH: -0.0577    ROT: 359.9988022    SCALE: 0.999959
XRMS: 0.15    YRMS: 0.1

RMS_RA: 8.7e-07 (deg)   RMS_DEC: 2.1e-06 (deg)

Final solution based on  28  objects.
wrote XY data to:  ua06050am_c0m_catalog_fit.match
Total # points:  28
# of points after clipping:  28
Total # points:  28
# of points after clipping:  28
Initializing new WCSCORR table for  ua06050am_c0m.fits
>>>>>>> upstream/gh-pages

....Updating header for ua060508m_c0m.fits...


Processing ua060508m_c0m.fits['SCI',1]

Updating header for ua060508m_c0m.fits[1]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: 2.4616104026781813e-06 -1.2410849733587726e-05
CD_21  CD_22: -1.2412445282692482e-05 -2.476077333039119e-06
CRVAL    : 323.31518459111646 -0.8706203793843243
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.045549817686568114
ORIENTAT : -101.28288464661262
=======
CD_11  CD_12: 2.462109221889474e-06 -1.2409676995967631e-05
CD_21  CD_22: -1.2411273220505197e-05 -2.4765748479150315e-06
CRVAL    : 323.3147617467205 -0.8709943225677621
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04554940414591529
ORIENTAT : -101.28613261833056
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua060508m_c0m.fits['SCI',2]

Updating header for ua060508m_c0m.fits[2]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: -2.7095509690454607e-05 -5.648562249475904e-06
CD_21  CD_22: -5.646238299820303e-06 2.709219927127634e-05
CRVAL    : 323.306451047408 -0.8563269953357582
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962771605323506
ORIENTAT : -11.777113788408368
=======
CD_11  CD_12: -2.7092935797635736e-05 -5.649627953331257e-06
CD_21  CD_22: -5.647304478976045e-06 2.70896254291493e-05
CRVAL    : 323.3060281183541 -0.8567026224784117
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09962681151551943
ORIENTAT : -11.780361577683164
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua060508m_c0m.fits['SCI',3]

Updating header for ua060508m_c0m.fits[3]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: -5.501023138329593e-06 2.7120401177168506e-05
CD_21  CD_22: 2.711969943712771e-05 5.4975617732892065e-06
CRVAL    : 323.32689104604674 -0.8523333371286425
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960773111614668
ORIENTAT : 78.54087598181746
=======
CD_11  CD_12: -5.502102812208037e-06 2.7117833558838373e-05
CD_21  CD_22: 2.7117131723901733e-05 5.498641778862356e-06
CRVAL    : 323.32646619232094 -0.8527081379995192
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960682680751902
ORIENTAT : 78.53762790860141
>>>>>>> upstream/gh-pages
WCSNAME  :  TWEAK

Processing ua060508m_c0m.fits['SCI',4]

Updating header for ua060508m_c0m.fits[4]
WCS Keywords

<<<<<<< HEAD
CD_11  CD_12: 2.7185870012419707e-05 5.2401586855053324e-06
CD_21  CD_22: 5.23506229251349e-06 -2.7190525688371044e-05
CRVAL    : 323.33110973457906 -0.873245663711097
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965572280724205
ORIENTAT : 169.09169252226863
WCSNAME  :  TWEAK

====================
Performing fit for: ua060504m_c0m.fits

Matching sources from 'ua060504m_c0m.fits' with sources from reference image 'ua06050cm_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.7443780563078377 0.05562194369215945
    with significance of  359.38862559981817 and  13.0  matches
Found 41 matches for ua060504m_c0m.fits...
Computed  rscale  fit for  ua060504m_c0m.fits : 
XSH: 0.0518  YSH: 0.0958    ROT: 0.002168108971    SCALE: 1.000119
XRMS: 0.16    YRMS: 0.14

RMS_RA: 1.3e-06 (deg)   RMS_DEC: 2.4e-06 (deg)

Final solution based on  37  objects.
wrote XY data to:  ua060504m_c0m_catalog_fit.match
Total # points:  37
# of points after clipping:  37
Total # points:  37
# of points after clipping:  37
Initializing new WCSCORR table for  ua060504m_c0m.fits

....Updating header for ua060504m_c0m.fits...


Processing ua060504m_c0m.fits['SCI',1]

Updating header for ua060504m_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.4610637499506074e-06 -1.2408227296380136e-05
CD_21  CD_22: -1.2409822500624854e-05 -2.4755275864905928e-06
CRVAL    : 323.3149440284383 -0.8704549834384
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555083662190098
ORIENTAT : -101.282766758852
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',2]

Updating header for ua060504m_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.708978494198656e-05 -5.647310610062362e-06
CD_21  CD_22: -5.644987241284532e-06 2.7086475145075006e-05
CRVAL    : 323.3062123634752 -0.8561646074813698
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996299446720908
ORIENTAT : -11.776995820861712
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',3]

Updating header for ua060504m_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.499802721566241e-06 2.711467084489796e-05
CD_21  CD_22: 2.711396926171765e-05 5.496342076454776e-06
CRVAL    : 323.32664804212277 -0.8521718368074881
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09960995931780645
ORIENTAT : 78.54099391553234
WCSNAME  :  TWEAK

Processing ua060504m_c0m.fits['SCI',4]

Updating header for ua060504m_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.7180125283143876e-05 5.238993289730057e-06
CD_21  CD_22: 5.233898019127758e-06 -2.7184779983360044e-05
CRVAL    : 323.3308657942896 -0.873079744730284
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965795192213613
ORIENTAT : 169.09181055734575
WCSNAME  :  TWEAK
Initializing new WCSCORR table for  ua06050cm_c0m.fits
=======
CD_11  CD_12: 2.7183311841303485e-05 5.241264043496563e-06
CD_21  CD_22: 5.236167848182511e-06 -2.7187966852014156e-05
CRVAL    : 323.3306857158846 -0.8736184859149022
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.0996548178526407
ORIENTAT : 169.08844452861456
WCSNAME  :  TWEAK

====================
Performing fit for: ua060502m_c0m.fits

Matching sources from 'ua060502m_c0m.fits' with sources from reference image 'ua060508m_c0m.fits'
Computing initial guess for X and Y shifts...
Found initial X and Y shifts of  -0.7779074680725415 -0.7484957033666575
    with significance of  425.8411675730753 and  21.0  matches
Found 33 matches for ua060502m_c0m.fits...
Computed  rscale  fit for  ua060502m_c0m.fits : 
XSH: -0.1437  YSH: -0.0014    ROT: 359.9996176    SCALE: 1.000076
XRMS: 0.18    YRMS: 0.097

RMS_RA: 7.8e-07 (deg)   RMS_DEC: 2.4e-06 (deg)

Final solution based on  31  objects.
wrote XY data to:  ua060502m_c0m_catalog_fit.match
Total # points:  31
# of points after clipping:  31
Total # points:  31
# of points after clipping:  31
Initializing new WCSCORR table for  ua060502m_c0m.fits

....Updating header for ua060502m_c0m.fits...


Processing ua060502m_c0m.fits['SCI',1]

Updating header for ua060502m_c0m.fits[1]
WCS Keywords

CD_11  CD_12: 2.4617406678422386e-06 -1.2408744461048928e-05
CD_21  CD_22: -1.2410340473087034e-05 -2.4762051529103463e-06
CRVAL    : 323.31471399908435 -0.8710690319212171
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.04555116863410184
ORIENTAT : -101.28531737775845
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',2]

Updating header for ua060502m_c0m.fits[2]
WCS Keywords

CD_11  CD_12: -2.7090903495910296e-05 -5.648801992111692e-06
CD_21  CD_22: -5.6464785841231276e-06 2.70875934111366e-05
CRVAL    : 323.30598125497585 -0.8567783220232795
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.099630670803459
ORIENTAT : -11.779546346110925
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',3]

Updating header for ua060502m_c0m.fits[3]
WCS Keywords

CD_11  CD_12: -5.501287900504715e-06 2.711579717140568e-05
CD_21  CD_22: 2.7115095432692507e-05 5.497827102979598e-06
CRVAL    : 323.32641779245074 -0.8527844398255842
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09961068533848494
ORIENTAT : 78.53844330772776
WCSNAME  :  TWEAK

Processing ua060502m_c0m.fits['SCI',4]

Updating header for ua060502m_c0m.fits[4]
WCS Keywords

CD_11  CD_12: 2.718126666030951e-05 5.240468509199975e-06
CD_21  CD_22: 5.235372726379987e-06 -2.7185921324829838e-05
CRVAL    : 323.330636689479 -0.8736932172069823
CRPIX    : 425.0 425.0
NAXIS    : 800 800
Plate Scale : 0.09965867839434511
ORIENTAT : 169.0892597834511
WCSNAME  :  TWEAK
Initializing new WCSCORR table for  ua060508m_c0m.fits
>>>>>>> upstream/gh-pages
Trailer file written to:  tweakreg.log
<<<<<<< HEAD >>>>>> upstream/gh-pages " >
<<<<<<< HEAD >>>>>> upstream/gh-pages " >
<<<<<<< HEAD >>>>>> upstream/gh-pages " >

4. Equalize the chip sensitivities

This step adjusts image data values so that all images and chips appear (to AstroDrizzle) to have a single inverse sensitivity (PHOTFLAM). This can be achieved using the photeq task in Drizzlepac. This task adjusts image data so that when these data are multiplied by the same single PHOTFLAM value, the correct flux is obtained.

In [7]:
photeq.photeq(files='ua*_c0m.fits', ref_phot_ext=3, readonly=False)
<<<<<<< HEAD
***** drizzlepac.photeq started on 2019-03-26 19:37:37.478717
=======
***** drizzlepac.photeq started on 2019-04-30 14:27:11.226092
>>>>>>> upstream/gh-pages
      Version 0.2 (06-Nov-2015)

PRIMARY PHOTOMETRIC KEYWORD: PHOTFLAM
SECONDARY PHOTOMETRIC KEYWORD(S): PHOTFNU
<<<<<<< HEAD
REFERENCE VALUE FROM FILE: 'ua06050cm_c0m.fits[3]'
REFERENCE 'PHOTFLAM' VALUE IS: 2.449067e-18

Processing file 'ua06050cm_c0m.fits'
=======
REFERENCE VALUE FROM FILE: 'ua060508m_c0m.fits[3]'
REFERENCE 'PHOTFLAM' VALUE IS: 2.449067e-18

Processing file 'ua060508m_c0m.fits'
>>>>>>> upstream/gh-pages
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3) - This is the "reference" extension.
          Nothing to do. Skipping this extension...
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

<<<<<<< HEAD
Processing file 'ua060502m_c0m.fits'
=======
Processing file 'ua06050cm_c0m.fits'
>>>>>>> upstream/gh-pages
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.449067e-18)
     - Computed conversion factor for data: 1.0
     - Data have been multiplied by 1.0
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

Processing file 'ua06050am_c0m.fits'
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.449067e-18)
     - Computed conversion factor for data: 1.0
     - Data have been multiplied by 1.0
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

<<<<<<< HEAD
Processing file 'ua060506m_c0m.fits'
=======
Processing file 'ua060504m_c0m.fits'
>>>>>>> upstream/gh-pages
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.449067e-18)
     - Computed conversion factor for data: 1.0
     - Data have been multiplied by 1.0
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

Processing file 'ua060508m_c0m.fits'
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.449067e-18)
     - Computed conversion factor for data: 1.0
     - Data have been multiplied by 1.0
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

<<<<<<< HEAD
Processing file 'ua060504m_c0m.fits'
=======
Processing file 'ua060502m_c0m.fits'
>>>>>>> upstream/gh-pages
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.449067e-18)
     - Computed conversion factor for data: 1.0
     - Data have been multiplied by 1.0
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

Done.

In the above command, we instruct photeq to "equalize" all chips of all input images using the PHOTFLAM for the WF3 chip (ref_phot_ext=3), using the first image as a reference. This reference PHOTFLAM value is reported in the log file:

REFERENCE VALUE FROM FILE: 'ua060502m_c0m.fits['SCI',1]'
REFERENCE 'PHOTFLAM' VALUE IS: 2.507987e-18

Upon the completion, photeq will not only adjust image data but also update PHOTFLAM values for all chips to this specific reference value.

5. Drizzle-combine the images

All four chips are now drizzled together with an output pixel scale set to that of the WF chips:

In [8]:
astrodrizzle.AstroDrizzle('ua*c0m.fits',
                          preserve=False,
                          driz_sep_bits='8,1024',
                          driz_sep_wcs=True,
                          driz_sep_scale=0.0996,
                          combine_type='median',
                          driz_cr_snr='5.5 3.5',
                          driz_cr_scale='2.0 1.5',
                          final_fillval=None,
                          final_bits='8,1024',
                          final_wcs=True,
                          final_scale=0.0996)
Setting up logfile :  astrodrizzle.log
<<<<<<< HEAD
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 19:37:38.099 (26/03/2019)

==== Processing Step  Initialization  started at  19:37:38.101 (26/03/2019)
=======
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 14:27:11.770 (30/04/2019)

==== Processing Step  Initialization  started at  14:27:11.772 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31866709205593  -0.8646686960932206  
CRPIX : 777.7568185110108  767.4671344271145  
CD1_1 CD1_2  : 5.413908726981324e-06  -2.7131790149939603e-05  
CD2_1 CD2_2  : -2.7131790149939603e-05  -5.413908726981324e-06  
NAXIS : 1554  1534
********************************************************************************
*
*  Estimated memory usage:  up to 64 Mb.
*  Output image size:       1554 X 1534 pixels. 
*  Output image file:       ~ 27 Mb. 
*  Cores available:         2
*
********************************************************************************
==== Processing Step  Initialization  finished at  19:37:41.75 (26/03/2019)

==== Processing Step  Static Mask  started at  19:37:41.755 (26/03/2019)
==== Processing Step  Static Mask  finished at  19:37:42.227 (26/03/2019)

==== Processing Step  Subtract Sky  started at  19:37:42.229 (26/03/2019)
***** skymatch started on 2019-03-26 19:37:43.310459
=======
CRVAL : 323.31866186555936  -0.8646699844009542  
CRPIX : 777.7568185110108  767.6957940734234  
CD1_1 CD1_2  : 5.4139087269362675e-06  -2.7131790149948595e-05  
CD2_1 CD2_2  : -2.7131790149948595e-05  -5.4139087269362675e-06  
NAXIS : 1554  1534
********************************************************************************
*
*  Estimated memory usage:  up to 771 Mb.
*  Output image size:       1554 X 1534 pixels. 
*  Output image file:       ~ 27 Mb. 
*  Cores available:         24
*
********************************************************************************
==== Processing Step  Initialization  finished at  14:27:14.487 (30/04/2019)

==== Processing Step  Static Mask  started at  14:27:14.489 (30/04/2019)
==== Processing Step  Static Mask  finished at  14:27:15.179 (30/04/2019)

==== Processing Step  Subtract Sky  started at  14:27:15.181 (30/04/2019)
***** skymatch started on 2019-04-30 14:27:16.011414
>>>>>>> upstream/gh-pages
      Version 1.0.2 (2019-03-07 00:54:44 -0500)

'skymatch' task will apply computed sky differences to input image file(s).

NOTE: Computed sky values WILL NOT be subtracted from image data ('subtractsky'=False).
'MDRIZSKY' header keyword will represent sky value *computed* from data.

-----  User specified keywords:  -----
       Sky Value Keyword:  'MDRIZSKY'
       Data Units Keyword: 'BUNIT'


-----  Input file list:  -----

   **  Input image: 'ua060502m_c0m.fits'
       EXT: 'SCI',1;	MASK: ua060502m_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua060502m_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua060502m_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua060502m_skymatch_mask_sci4.fits[0]

   **  Input image: 'ua060504m_c0m.fits'
       EXT: 'SCI',1;	MASK: ua060504m_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua060504m_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua060504m_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua060504m_skymatch_mask_sci4.fits[0]

   **  Input image: 'ua060506m_c0m.fits'
       EXT: 'SCI',1;	MASK: ua060506m_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua060506m_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua060506m_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua060506m_skymatch_mask_sci4.fits[0]

   **  Input image: 'ua060508m_c0m.fits'
       EXT: 'SCI',1;	MASK: ua060508m_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua060508m_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua060508m_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua060508m_skymatch_mask_sci4.fits[0]

   **  Input image: 'ua06050am_c0m.fits'
       EXT: 'SCI',1;	MASK: ua06050am_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua06050am_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua06050am_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua06050am_skymatch_mask_sci4.fits[0]

   **  Input image: 'ua06050cm_c0m.fits'
       EXT: 'SCI',1;	MASK: ua06050cm_skymatch_mask_sci1.fits[0]
       EXT: 'SCI',2;	MASK: ua06050cm_skymatch_mask_sci2.fits[0]
       EXT: 'SCI',3;	MASK: ua06050cm_skymatch_mask_sci3.fits[0]
       EXT: 'SCI',4;	MASK: ua06050cm_skymatch_mask_sci4.fits[0]

-----  Sky statistics parameters:  -----
       statistics function: 'median'
       lower = None
       upper = None
       nclip = 5
       lsigma = 4.0
       usigma = 4.0
       binwidth = 0.1

-----  Data->Brightness conversion parameters for input files:  -----

   *   Image: ua060502m_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038

   *   Image: ua060504m_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038

   *   Image: ua060506m_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038

   *   Image: ua060508m_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038

   *   Image: ua06050am_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038

   *   Image: ua06050cm_c0m.fits
       EXT = 'SCI',1
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  48.199471583929096
       EXT = 'SCI',2
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.075222287537429
       EXT = 'SCI',3
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.079268189497055
       EXT = 'SCI',4
             Data units type: COUNTS
             EXPTIME: 10.0 [s]
             Conversion factor (data->brightness):  10.069561513886038


-----  Computing sky values requested image extensions (detector chips):  -----

   *   Image:   'ua060502m_c0m.fits['SCI',1,2,3,4]'  --  SKY = -17.481034058661276 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.362681   NEW MDRIZSKY = -0.362681
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.73505   NEW MDRIZSKY = -1.73505
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.73436   NEW MDRIZSKY = -1.73436
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.73603   NEW MDRIZSKY = -1.73603
   *   Image:   'ua060504m_c0m.fits['SCI',1,2,3,4]'  --  SKY = -19.184347898616416 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.39802   NEW MDRIZSKY = -0.39802
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.90411   NEW MDRIZSKY = -1.90411
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.90335   NEW MDRIZSKY = -1.90335
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.90518   NEW MDRIZSKY = -1.90518
   *   Image:   'ua060506m_c0m.fits['SCI',1,2,3,4]'  --  SKY = -17.294534642007278 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.358812   NEW MDRIZSKY = -0.358812
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.71654   NEW MDRIZSKY = -1.71654
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.71585   NEW MDRIZSKY = -1.71585
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.71751   NEW MDRIZSKY = -1.71751
   *   Image:   'ua060508m_c0m.fits['SCI',1,2,3,4]'  --  SKY = -19.75838883105671 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.40993   NEW MDRIZSKY = -0.40993
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.96109   NEW MDRIZSKY = -1.96109
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.9603   NEW MDRIZSKY = -1.9603
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.96219   NEW MDRIZSKY = -1.96219
   *   Image:   'ua06050am_c0m.fits['SCI',1,2,3,4]'  --  SKY = -18.018405137456174 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.37383   NEW MDRIZSKY = -0.37383
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.78839   NEW MDRIZSKY = -1.78839
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.78767   NEW MDRIZSKY = -1.78767
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.78939   NEW MDRIZSKY = -1.78939
   *   Image:   'ua06050cm_c0m.fits['SCI',1,2,3,4]'  --  SKY = -10.481485413650148 (brightness units)
       Sky change (data units):
      - EXT = 'SCI',1   delta(MDRIZSKY) = -0.217461   NEW MDRIZSKY = -0.217461
      - EXT = 'SCI',2   delta(MDRIZSKY) = -1.04032   NEW MDRIZSKY = -1.04032
      - EXT = 'SCI',3   delta(MDRIZSKY) = -1.03991   NEW MDRIZSKY = -1.03991
      - EXT = 'SCI',4   delta(MDRIZSKY) = -1.04091   NEW MDRIZSKY = -1.04091
<<<<<<< HEAD
***** skymatch ended on 2019-03-26 19:37:44.953140
TOTAL RUN TIME: 0:00:01.642681
==== Processing Step  Subtract Sky  finished at  19:37:45.179 (26/03/2019)

==== Processing Step  Separate Drizzle  started at  19:37:45.181 (26/03/2019)
=======
***** skymatch ended on 2019-04-30 14:27:17.796941
TOTAL RUN TIME: 0:00:01.785527
==== Processing Step  Subtract Sky  finished at  14:27:18.062 (30/04/2019)

==== Processing Step  Separate Drizzle  started at  14:27:18.063 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31866709205593  -0.8646686960932206  
CRPIX : 777.7568185110108  767.4671344271145  
CD1_1 CD1_2  : 5.413908726981324e-06  -2.7131790149939603e-05  
CD2_1 CD2_2  : -2.7131790149939603e-05  -5.413908726981324e-06  
NAXIS : 1554  1534
-Generating simple FITS output: ua060502m_c0m_single_sci.fits
-Generating simple FITS output: ua060504m_c0m_single_sci.fits
Writing out image to disk: ua060502m_c0m_single_sci.fits
Writing out image to disk: ua060504m_c0m_single_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua060502m_c0m_single_wht.fits
Writing out image to disk: ua060504m_c0m_single_wht.fits
-Generating simple FITS output: ua060508m_c0m_single_sci.fits
-Generating simple FITS output: ua060506m_c0m_single_sci.fits
Writing out image to disk: ua060506m_c0m_single_sci.fits
Writing out image to disk: ua060508m_c0m_single_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua060506m_c0m_single_wht.fits
Writing out image to disk: ua060508m_c0m_single_wht.fits
-Generating simple FITS output: ua06050am_c0m_single_sci.fits
-Generating simple FITS output: ua06050cm_c0m_single_sci.fits
Writing out image to disk: ua06050am_c0m_single_sci.fits
Writing out image to disk: ua06050cm_c0m_single_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua06050am_c0m_single_wht.fits
Writing out image to disk: ua06050cm_c0m_single_wht.fits
==== Processing Step  Separate Drizzle  finished at  19:37:50.877 (26/03/2019)

==== Processing Step  Create Median  started at  19:37:50.880 (26/03/2019)
=======
CRVAL : 323.31866186555936  -0.8646699844009542  
CRPIX : 777.7568185110108  767.6957940734234  
CD1_1 CD1_2  : 5.4139087269362675e-06  -2.7131790149948595e-05  
CD2_1 CD2_2  : -2.7131790149948595e-05  -5.4139087269362675e-06  
NAXIS : 1554  1534
-Generating simple FITS output: ua060502m_c0m_single_sci.fits
-Generating simple FITS output: ua06050am_c0m_single_sci.fits
Writing out image to disk: ua060502m_c0m_single_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
-Generating simple FITS output: ua060506m_c0m_single_sci.fits
-Generating simple FITS output: ua060508m_c0m_single_sci.fits
Writing out image to disk: ua060502m_c0m_single_wht.fits
Writing out image to disk: ua06050am_c0m_single_sci.fits
-Generating simple FITS output: ua06050cm_c0m_single_sci.fits
Writing out image to disk: ua060508m_c0m_single_sci.fits
Writing out image to disk: ua060506m_c0m_single_sci.fits
-Generating simple FITS output: ua060504m_c0m_single_sci.fits
Writing out image to disk: ua06050cm_c0m_single_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua060504m_c0m_single_sci.fits
Writing out image to disk: ua060508m_c0m_single_wht.fits
Writing out image to disk: ua06050am_c0m_single_wht.fits
Deleted all instances of WCS with key B in extensions [0]
Deleted all instances of WCS with key A in extensions [0]
Writing out image to disk: ua060506m_c0m_single_wht.fits
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua06050cm_c0m_single_wht.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: ua060504m_c0m_single_wht.fits
==== Processing Step  Separate Drizzle  finished at  14:27:22.086 (30/04/2019)

==== Processing Step  Create Median  started at  14:27:22.089 (30/04/2019)
>>>>>>> upstream/gh-pages
reference sky value for image 'ua060502m_c0m.fits' is -2.582288942337036
reference sky value for image 'ua060504m_c0m.fits' is -2.8339015460014347
reference sky value for image 'ua060506m_c0m.fits' is -2.5547393488883974
reference sky value for image 'ua060508m_c0m.fits' is -2.9186985635757448
reference sky value for image 'ua06050am_c0m.fits' is -2.661669108867646
reference sky value for image 'ua06050cm_c0m.fits' is -1.5483193838596345
Saving output median image to: 'final_med.fits'
<<<<<<< HEAD
==== Processing Step  Create Median  finished at  19:37:51.93 (26/03/2019)

==== Processing Step  Blot  started at  19:37:51.933 (26/03/2019)
=======
==== Processing Step  Create Median  finished at  14:27:23.863 (30/04/2019)

==== Processing Step  Blot  started at  14:27:23.865 (30/04/2019)
>>>>>>> upstream/gh-pages
    Blot: creating blotted image:  ua060502m_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060502m_c0m_sci1_blt.fits
Writing out image to disk: ua060502m_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua060502m_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060502m_c0m_sci2_blt.fits
Writing out image to disk: ua060502m_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua060502m_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060502m_c0m_sci3_blt.fits
Writing out image to disk: ua060502m_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua060502m_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060502m_c0m_sci4_blt.fits
Writing out image to disk: ua060502m_c0m_sci4_blt.fits
    Blot: creating blotted image:  ua060504m_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060504m_c0m_sci1_blt.fits
Writing out image to disk: ua060504m_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua060504m_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060504m_c0m_sci2_blt.fits
Writing out image to disk: ua060504m_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua060504m_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060504m_c0m_sci3_blt.fits
Writing out image to disk: ua060504m_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua060504m_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060504m_c0m_sci4_blt.fits
Writing out image to disk: ua060504m_c0m_sci4_blt.fits
    Blot: creating blotted image:  ua060506m_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060506m_c0m_sci1_blt.fits
Writing out image to disk: ua060506m_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua060506m_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060506m_c0m_sci2_blt.fits
Writing out image to disk: ua060506m_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua060506m_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060506m_c0m_sci3_blt.fits
Writing out image to disk: ua060506m_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua060506m_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060506m_c0m_sci4_blt.fits
Writing out image to disk: ua060506m_c0m_sci4_blt.fits
    Blot: creating blotted image:  ua060508m_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060508m_c0m_sci1_blt.fits
Writing out image to disk: ua060508m_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua060508m_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060508m_c0m_sci2_blt.fits
Writing out image to disk: ua060508m_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua060508m_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060508m_c0m_sci3_blt.fits
Writing out image to disk: ua060508m_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua060508m_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua060508m_c0m_sci4_blt.fits
Writing out image to disk: ua060508m_c0m_sci4_blt.fits
    Blot: creating blotted image:  ua06050am_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050am_c0m_sci1_blt.fits
Writing out image to disk: ua06050am_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua06050am_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050am_c0m_sci2_blt.fits
Writing out image to disk: ua06050am_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua06050am_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050am_c0m_sci3_blt.fits
Writing out image to disk: ua06050am_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua06050am_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050am_c0m_sci4_blt.fits
Writing out image to disk: ua06050am_c0m_sci4_blt.fits
    Blot: creating blotted image:  ua06050cm_c0m.fits[sci,1]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050cm_c0m_sci1_blt.fits
Writing out image to disk: ua06050cm_c0m_sci1_blt.fits
    Blot: creating blotted image:  ua06050cm_c0m.fits[sci,2]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050cm_c0m_sci2_blt.fits
Writing out image to disk: ua06050cm_c0m_sci2_blt.fits
    Blot: creating blotted image:  ua06050cm_c0m.fits[sci,3]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050cm_c0m_sci3_blt.fits
Writing out image to disk: ua06050cm_c0m_sci3_blt.fits
    Blot: creating blotted image:  ua06050cm_c0m.fits[sci,4]
Using default C-based coordinate transformation...
-Generating simple FITS output: ua06050cm_c0m_sci4_blt.fits
Writing out image to disk: ua06050cm_c0m_sci4_blt.fits
<<<<<<< HEAD
==== Processing Step  Blot  finished at  19:38:02.08 (26/03/2019)

==== Processing Step  Driz_CR  started at  19:38:02.087 (26/03/2019)
Creating output :  ua060502m_c0m_sci1_crmask.fits
Creating output :  ua060504m_c0m_sci1_crmask.fits
Creating output :  ua060502m_c0m_sci2_crmask.fits
Creating output :  ua060504m_c0m_sci2_crmask.fits
Creating output :  ua060502m_c0m_sci3_crmask.fits
Creating output :  ua060504m_c0m_sci3_crmask.fits
Creating output :  ua060504m_c0m_sci4_crmask.fits
Creating output :  ua060502m_c0m_sci4_crmask.fits
=======
==== Processing Step  Blot  finished at  14:27:39.413 (30/04/2019)

==== Processing Step  Driz_CR  started at  14:27:39.41 (30/04/2019)
Creating output :  ua060502m_c0m_sci1_crmask.fits
>>>>>>> upstream/gh-pages
Creating output :  ua060506m_c0m_sci1_crmask.fits
Creating output :  ua06050cm_c0m_sci1_crmask.fits
Creating output :  ua060502m_c0m_sci2_crmask.fits
Creating output :  ua060508m_c0m_sci1_crmask.fits
<<<<<<< HEAD
Creating output :  ua060506m_c0m_sci2_crmask.fits
Creating output :  ua060508m_c0m_sci2_crmask.fits
Creating output :  ua060506m_c0m_sci3_crmask.fits
Creating output :  ua060508m_c0m_sci3_crmask.fits
Creating output :  ua060506m_c0m_sci4_crmask.fits
=======
Creating output :  ua060504m_c0m_sci1_crmask.fits
Creating output :  ua06050am_c0m_sci1_crmask.fits
Creating output :  ua060506m_c0m_sci2_crmask.fits
Creating output :  ua06050cm_c0m_sci2_crmask.fits
Creating output :  ua060504m_c0m_sci2_crmask.fits
Creating output :  ua060502m_c0m_sci3_crmask.fits
Creating output :  ua060508m_c0m_sci2_crmask.fits
Creating output :  ua06050am_c0m_sci2_crmask.fits
Creating output :  ua060506m_c0m_sci3_crmask.fits
Creating output :  ua060502m_c0m_sci4_crmask.fits
Creating output :  ua060504m_c0m_sci3_crmask.fits
Creating output :  ua06050cm_c0m_sci3_crmask.fits
Creating output :  ua06050am_c0m_sci3_crmask.fits
Creating output :  ua060506m_c0m_sci4_crmask.fits
Creating output :  ua060508m_c0m_sci3_crmask.fits
Creating output :  ua060504m_c0m_sci4_crmask.fits
>>>>>>> upstream/gh-pages
Creating output :  ua060508m_c0m_sci4_crmask.fits
Creating output :  ua06050am_c0m_sci1_crmask.fits
Creating output :  ua06050cm_c0m_sci1_crmask.fits
Creating output :  ua06050am_c0m_sci2_crmask.fits
Creating output :  ua06050cm_c0m_sci2_crmask.fits
Creating output :  ua06050am_c0m_sci3_crmask.fits
Creating output :  ua06050cm_c0m_sci3_crmask.fits
Creating output :  ua06050am_c0m_sci4_crmask.fits
Creating output :  ua06050cm_c0m_sci4_crmask.fits
<<<<<<< HEAD
==== Processing Step  Driz_CR  finished at  19:38:05.300 (26/03/2019)

==== Processing Step  Final Drizzle  started at  19:38:05.313 (26/03/2019)
=======
==== Processing Step  Driz_CR  finished at  14:27:45.13 (30/04/2019)

==== Processing Step  Final Drizzle  started at  14:27:45.160 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31866709205593  -0.8646686960932206  
CRPIX : 777.7568185110108  767.4671344271145  
CD1_1 CD1_2  : 5.413908726981324e-06  -2.7131790149939603e-05  
CD2_1 CD2_2  : -2.7131790149939603e-05  -5.413908726981324e-06  
=======
CRVAL : 323.31866186555936  -0.8646699844009542  
CRPIX : 777.7568185110108  767.6957940734234  
CD1_1 CD1_2  : 5.4139087269362675e-06  -2.7131790149948595e-05  
CD2_1 CD2_2  : -2.7131790149948595e-05  -5.4139087269362675e-06  
>>>>>>> upstream/gh-pages
NAXIS : 1554  1534
-Generating simple FITS output: final_drz_sci.fits
Writing out image to disk: final_drz_sci.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: final_drz_wht.fits
Deleted all instances of WCS with key A in extensions [0]
Deleted all instances of WCS with key B in extensions [0]
Writing out image to disk: final_drz_ctx.fits
<<<<<<< HEAD
==== Processing Step  Final Drizzle  finished at  19:38:18.541 (26/03/2019)


AstroDrizzle Version 2.2.6 is finished processing at 19:38:18.544 (26/03/2019).
=======
==== Processing Step  Final Drizzle  finished at  14:27:57.834 (30/04/2019)


AstroDrizzle Version 2.2.6 is finished processing at 14:27:57.836 (30/04/2019).
>>>>>>> upstream/gh-pages


   --------------------          --------------------
                   Step          Elapsed time
   --------------------          --------------------

<<<<<<< HEAD
         Initialization          3.6513 sec.
            Static Mask          0.4724 sec.
           Subtract Sky          2.9501 sec.
       Separate Drizzle          5.6960 sec.
          Create Median          1.0517 sec.
                   Blot          10.1527 sec.
                Driz_CR          3.2130 sec.
          Final Drizzle          13.2281 sec.
   ====================          ====================
                  Total          40.4152 sec.
=======
         Initialization          2.7151 sec.
            Static Mask          0.6898 sec.
           Subtract Sky          2.8810 sec.
       Separate Drizzle          4.0228 sec.
          Create Median          1.7742 sec.
                   Blot          15.5473 sec.
                Driz_CR          5.7225 sec.
          Final Drizzle          12.6745 sec.
   ====================          ====================
                  Total          46.0272 sec.
>>>>>>> upstream/gh-pages
Trailer file written to:  astrodrizzle.log
In [9]:
drz = fits.getdata('final_drz_sci.fits')
plt.figure(figsize=(15, 15))
plt.imshow(drz, cmap='gray', vmin=-0.1, vmax=0.5, origin='lower')
Out[9]:
<<<<<<< HEAD
<matplotlib.image.AxesImage at 0x7f4eea13def0>
=======
<matplotlib.image.AxesImage at 0x7fa00d563cf8>
>>>>>>> upstream/gh-pages
<<<<<<< HEAD >>>>>> upstream/gh-pages " >

6. Illustration of the Effects of Sensitivity Variation on Drizzling

The effect of drizzling images with different detector sensitivies, while tangible, is sometimes difficult to visualize in noisy data, especially when drizzling multiple dithered images that can blur the borders between chips.

In this section we produce a simple simulation of observing a constant intensity "blank sky". We then make a copy of this image and apply sensitivity equalization to it. Finally we drizzle both images and compare them side-by-side.

Simulate an Image of Constant "Blank Sky" Background

In this simple simulation we assume only Poisson noise.

In [10]:
with fits.open(backup_image, mode='update') as h:
    # get chip inverse-sensitivity:
    phot1 = h[1].header['PHOTFLAM']
    phot2 = h[2].header['PHOTFLAM']
    phot3 = h[3].header['PHOTFLAM']
    phot4 = h[4].header['PHOTFLAM']
    
    # get chip WCS:
    w1 = HSTWCS(h, ext=1)
    w2 = HSTWCS(h, ext=2)
    w3 = HSTWCS(h, ext=3)
    w4 = HSTWCS(h, ext=4)
    ref_pscale = w4.idcscale
    
    # get chip gain:
    cmdgain = h[0].header['ATODGAIN']
    gain1 = WFPC2_GAINS[1][cmdgain][0]
    gain2 = WFPC2_GAINS[2][cmdgain][0]
    gain3 = WFPC2_GAINS[3][cmdgain][0]
    gain4 = WFPC2_GAINS[4][cmdgain][0]
    
    # final drizzle scale:
    scale = 0.0996
    
    # simulated sky level ("true" sky is constant):
    sky = 10 * phot3

    # simulate observed counts assuming only Poisson noise:
    conv1a = gain1 * (w1.idcscale / ref_pscale)**2 / phot1
    conv1b = (gain4 / gain1**2) * (ref_pscale / scale)**2
    conv2a = gain2 * (w2.idcscale / ref_pscale)**2 / phot2
    conv2b = (gain4 / gain2**2) * (ref_pscale / scale)**2
    conv3a = gain3 * (w3.idcscale / ref_pscale)**2 / phot3
    conv3b = (gain4 / gain3**2) * (ref_pscale / scale)**2
    conv4a = gain4 * (w4.idcscale / ref_pscale)**2 / phot4
    conv4b = (1.0 / gain4) * (ref_pscale / scale)**2

    h[1].data[:, :] = np.random.poisson(conv1a * sky, h[1].data.shape) * conv1b
    h[2].data[:, :] = np.random.poisson(conv2a * sky, h[2].data.shape) * conv2b
    h[3].data[:, :] = np.random.poisson(conv3a * sky, h[3].data.shape) * conv3b
    h[4].data[:, :] = np.random.poisson(conv4a * sky, h[4].data.shape) * conv4b

# make a copy of this file:
photeq_image = 'simulation_eq.fits'
if os.path.isfile(photeq_image):
    os.remove(photeq_image)
shutil.copy2(backup_image, photeq_image)

# apply equalization to the image copy:
photeq.photeq(files=photeq_image, ref_phot_ext=3, readonly=False)
<<<<<<< HEAD
***** drizzlepac.photeq started on 2019-03-26 19:38:24.071188
=======
***** drizzlepac.photeq started on 2019-04-30 14:27:59.321349
>>>>>>> upstream/gh-pages
      Version 0.2 (06-Nov-2015)

PRIMARY PHOTOMETRIC KEYWORD: PHOTFLAM
SECONDARY PHOTOMETRIC KEYWORD(S): PHOTFNU
REFERENCE VALUE FROM FILE: 'simulation_eq.fits[3]'
REFERENCE 'PHOTFLAM' VALUE IS: 2.449067e-18

Processing file 'simulation_eq.fits'
   * EXT: ('SCI', 1)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.507987e-18)
     - Computed conversion factor for data: 1.0240581413248393
     - Data have been multiplied by 1.0240581413248393
   * EXT: ('SCI', 2)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.458077e-18)
     - Computed conversion factor for data: 1.0036789520254041
     - Data have been multiplied by 1.0036789520254041
   * EXT: ('SCI', 3) - This is the "reference" extension.
          Nothing to do. Skipping this extension...
   * EXT: ('SCI', 4)
     - Setting PHOTFLAM to 2.449067e-18 (old value was 2.498411e-18)
     - Computed conversion factor for data: 1.0201480808814134
     - Data have been multiplied by 1.0201480808814134

Done.

Drizzle the Original Simulated Image and the Equalized Image

In [11]:
astrodrizzle.AstroDrizzle(
    backup_image,
    output='nonequalized.fits',
    stepsize=1,
    preserve=False,
    restore=False,
    in_memory=True,
    context=False,
    build=False,
    static=False,
    skysub=False,
    median=False,
    blot=False,
    driz_cr=False,
    final_fillval=None,
    final_bits='',
    final_wcs=True,
    final_scale=scale)

astrodrizzle.AstroDrizzle(
    photeq_image,
    output='equalized.fits',
    stepsize=1,
    preserve=False,
    restore=False,
    in_memory=True,
    context=False,
    build=False,
    static=False,
    skysub=False,
    median=False,
    blot=False,
    driz_cr=False,
    final_fillval=None,
    final_bits='',
    final_wcs=True,
    final_scale=scale)
Setting up logfile :  astrodrizzle.log
<<<<<<< HEAD
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 19:38:24.19 (26/03/2019)

==== Processing Step  Initialization  started at  19:38:24.19 (26/03/2019)
=======
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 14:27:59.403 (30/04/2019)

==== Processing Step  Initialization  started at  14:27:59.405 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.41390875007535e-06  -2.7131790145331395e-05  
CD2_1 CD2_2  : -2.7131790145331395e-05  -5.41390875007535e-06  
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.413908742123534e-06  -2.713179014691811e-05  
CD2_1 CD2_2  : -2.713179014691811e-05  -5.413908742123534e-06  
>>>>>>> upstream/gh-pages
NAXIS : 1522  1502
********************************************************************************
*
*  Estimated memory usage:  up to 62 Mb.
*  Output image size:       1522 X 1502 pixels. 
*  Output image file:       ~ 26 Mb. 
*  Cores available:         2
*
********************************************************************************
<<<<<<< HEAD
==== Processing Step  Initialization  finished at  19:38:24.6 (26/03/2019)

==== Processing Step  Static Mask  started at  19:38:24.626 (26/03/2019)
==== Processing Step  Static Mask  finished at  19:38:24.627 (26/03/2019)

==== Processing Step  Subtract Sky  started at  19:38:24.629 (26/03/2019)
==== Processing Step  Subtract Sky  finished at  19:38:24.693 (26/03/2019)

==== Processing Step  Separate Drizzle  started at  19:38:24.695 (26/03/2019)
=======
==== Processing Step  Initialization  finished at  14:27:59.690 (30/04/2019)

==== Processing Step  Static Mask  started at  14:27:59.692 (30/04/2019)
==== Processing Step  Static Mask  finished at  14:27:59.692 (30/04/2019)

==== Processing Step  Subtract Sky  started at  14:27:59.694 (30/04/2019)
==== Processing Step  Subtract Sky  finished at  14:27:59.735 (30/04/2019)

==== Processing Step  Separate Drizzle  started at  14:27:59.737 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 1664.0  1642.0  
CD1_1 CD1_2  : 2.4758849198807486e-06  -1.2407891076712397e-05  
CD2_1 CD2_2  : -1.2407891076712397e-05  -2.4758849198807486e-06  
NAXIS : 3328  3284
-Generating simple FITS output: simulation_single_sci.fits
==== Processing Step  Separate Drizzle  finished at  19:38:27.017 (26/03/2019)

==== Processing Step  Create Median  started at  19:38:27.018 (26/03/2019)
==== Processing Step  Blot  started at  19:38:27.019 (26/03/2019)
==== Processing Step  Blot  finished at  19:38:27.020 (26/03/2019)

==== Processing Step  Driz_CR  started at  19:38:27.021 (26/03/2019)
==== Processing Step  Final Drizzle  started at  19:38:27.023 (26/03/2019)
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 1664.0  1642.0  
CD1_1 CD1_2  : 2.4758849162442303e-06  -1.2407891077438035e-05  
CD2_1 CD2_2  : -1.2407891077438035e-05  -2.4758849162442303e-06  
NAXIS : 3328  3284
-Generating simple FITS output: simulation_single_sci.fits
==== Processing Step  Separate Drizzle  finished at  14:28:02.930 (30/04/2019)

==== Processing Step  Create Median  started at  14:28:02.934 (30/04/2019)
==== Processing Step  Blot  started at  14:28:02.934 (30/04/2019)
==== Processing Step  Blot  finished at  14:28:02.935 (30/04/2019)

==== Processing Step  Driz_CR  started at  14:28:02.936 (30/04/2019)
==== Processing Step  Final Drizzle  started at  14:28:02.937 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.41390875007535e-06  -2.7131790145331395e-05  
CD2_1 CD2_2  : -2.7131790145331395e-05  -5.41390875007535e-06  
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.413908742123534e-06  -2.713179014691811e-05  
CD2_1 CD2_2  : -2.713179014691811e-05  -5.413908742123534e-06  
>>>>>>> upstream/gh-pages
NAXIS : 1522  1502
-Generating simple FITS output: nonequalized_sci.fits
Writing out image to disk: nonequalized_sci.fits
Writing out image to disk: nonequalized_wht.fits
<<<<<<< HEAD
==== Processing Step  Final Drizzle  finished at  19:38:30.817 (26/03/2019)


AstroDrizzle Version 2.2.6 is finished processing at 19:38:30.819 (26/03/2019).
=======
==== Processing Step  Final Drizzle  finished at  14:28:07.565 (30/04/2019)


AstroDrizzle Version 2.2.6 is finished processing at 14:28:07.569 (30/04/2019).
>>>>>>> upstream/gh-pages


   --------------------          --------------------
                   Step          Elapsed time
   --------------------          --------------------

<<<<<<< HEAD
         Initialization          0.4263 sec.
            Static Mask          0.0007 sec.
           Subtract Sky          0.0643 sec.
       Separate Drizzle          2.3216 sec.
          Create Median          0.0000 sec.
                   Blot          0.0007 sec.
                Driz_CR          0.0000 sec.
          Final Drizzle          3.7938 sec.
   ====================          ====================
                  Total          6.6073 sec.
Trailer file written to:  astrodrizzle.log
Setting up logfile :  astrodrizzle.log
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 19:38:30.866 (26/03/2019)

==== Processing Step  Initialization  started at  19:38:30.86 (26/03/2019)
=======
         Initialization          0.2846 sec.
            Static Mask          0.0007 sec.
           Subtract Sky          0.0415 sec.
       Separate Drizzle          3.1938 sec.
          Create Median          0.0000 sec.
                   Blot          0.0008 sec.
                Driz_CR          0.0000 sec.
          Final Drizzle          4.6278 sec.
   ====================          ====================
                  Total          8.1492 sec.
Trailer file written to:  astrodrizzle.log
Setting up logfile :  astrodrizzle.log
AstroDrizzle Version 2.2.6 (2018-11-02 15:37:13 -0400) started at: 14:28:07.637 (30/04/2019)

==== Processing Step  Initialization  started at  14:28:07.641 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.41390875007535e-06  -2.7131790145331395e-05  
CD2_1 CD2_2  : -2.7131790145331395e-05  -5.41390875007535e-06  
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.413908742123534e-06  -2.713179014691811e-05  
CD2_1 CD2_2  : -2.713179014691811e-05  -5.413908742123534e-06  
>>>>>>> upstream/gh-pages
NAXIS : 1522  1502
********************************************************************************
*
*  Estimated memory usage:  up to 62 Mb.
*  Output image size:       1522 X 1502 pixels. 
*  Output image file:       ~ 26 Mb. 
*  Cores available:         2
*
********************************************************************************
<<<<<<< HEAD
==== Processing Step  Initialization  finished at  19:38:31.291 (26/03/2019)

==== Processing Step  Static Mask  started at  19:38:31.293 (26/03/2019)
==== Processing Step  Static Mask  finished at  19:38:31.294 (26/03/2019)

==== Processing Step  Subtract Sky  started at  19:38:31.296 (26/03/2019)
==== Processing Step  Subtract Sky  finished at  19:38:31.361 (26/03/2019)

==== Processing Step  Separate Drizzle  started at  19:38:31.36 (26/03/2019)
=======
==== Processing Step  Initialization  finished at  14:28:08.014 (30/04/2019)

==== Processing Step  Static Mask  started at  14:28:08.017 (30/04/2019)
==== Processing Step  Static Mask  finished at  14:28:08.018 (30/04/2019)

==== Processing Step  Subtract Sky  started at  14:28:08.020 (30/04/2019)
==== Processing Step  Subtract Sky  finished at  14:28:08.095 (30/04/2019)

==== Processing Step  Separate Drizzle  started at  14:28:08.097 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 1664.0  1642.0  
CD1_1 CD1_2  : 2.4758849198807486e-06  -1.2407891076712397e-05  
CD2_1 CD2_2  : -1.2407891076712397e-05  -2.4758849198807486e-06  
NAXIS : 3328  3284
-Generating simple FITS output: simulation_eq_single_sci.fits
==== Processing Step  Separate Drizzle  finished at  19:38:33.732 (26/03/2019)

==== Processing Step  Create Median  started at  19:38:33.734 (26/03/2019)
==== Processing Step  Blot  started at  19:38:33.734 (26/03/2019)
==== Processing Step  Blot  finished at  19:38:33.735 (26/03/2019)

==== Processing Step  Driz_CR  started at  19:38:33.737 (26/03/2019)
==== Processing Step  Final Drizzle  started at  19:38:33.738 (26/03/2019)
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 1664.0  1642.0  
CD1_1 CD1_2  : 2.4758849162442303e-06  -1.2407891077438035e-05  
CD2_1 CD2_2  : -1.2407891077438035e-05  -2.4758849162442303e-06  
NAXIS : 3328  3284
-Generating simple FITS output: simulation_eq_single_sci.fits
==== Processing Step  Separate Drizzle  finished at  14:28:11.59 (30/04/2019)

==== Processing Step  Create Median  started at  14:28:11.592 (30/04/2019)
==== Processing Step  Blot  started at  14:28:11.593 (30/04/2019)
==== Processing Step  Blot  finished at  14:28:11.594 (30/04/2019)

==== Processing Step  Driz_CR  started at  14:28:11.596 (30/04/2019)
==== Processing Step  Final Drizzle  started at  14:28:11.596 (30/04/2019)
>>>>>>> upstream/gh-pages
WCS Keywords

Number of WCS axes: 2
CTYPE : 'RA---TAN'  'DEC--TAN'  
<<<<<<< HEAD
CRVAL : 323.31858741074285  -0.8645160387379045  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.41390875007535e-06  -2.7131790145331395e-05  
CD2_1 CD2_2  : -2.7131790145331395e-05  -5.41390875007535e-06  
=======
CRVAL : 323.3187833728684  -0.8647514972321785  
CRPIX : 761.5219836230856  751.4609591854982  
CD1_1 CD1_2  : 5.413908742123534e-06  -2.713179014691811e-05  
CD2_1 CD2_2  : -2.713179014691811e-05  -5.413908742123534e-06  
>>>>>>> upstream/gh-pages
NAXIS : 1522  1502
-Generating simple FITS output: equalized_sci.fits
Writing out image to disk: equalized_sci.fits
Writing out image to disk: equalized_wht.fits
<<<<<<< HEAD
==== Processing Step  Final Drizzle  finished at  19:38:37.492 (26/03/2019)


AstroDrizzle Version 2.2.6 is finished processing at 19:38:37.494 (26/03/2019).
=======
==== Processing Step  Final Drizzle  finished at  14:28:16.485 (30/04/2019)


AstroDrizzle Version 2.2.6 is finished processing at 14:28:16.48 (30/04/2019).
>>>>>>> upstream/gh-pages


   --------------------          --------------------
                   Step          Elapsed time
   --------------------          --------------------

<<<<<<< HEAD
         Initialization          0.4231 sec.
            Static Mask          0.0007 sec.
           Subtract Sky          0.0648 sec.
       Separate Drizzle          2.3696 sec.
          Create Median          0.0000 sec.
                   Blot          0.0009 sec.
                Driz_CR          0.0000 sec.
          Final Drizzle          3.7543 sec.
   ====================          ====================
                  Total          6.6134 sec.
=======
         Initialization          0.3734 sec.
            Static Mask          0.0009 sec.
           Subtract Sky          0.0751 sec.
       Separate Drizzle          3.4927 sec.
          Create Median          0.0000 sec.
                   Blot          0.0011 sec.
                Driz_CR          0.0000 sec.
          Final Drizzle          4.8882 sec.
   ====================          ====================
                  Total          8.8314 sec.
>>>>>>> upstream/gh-pages
Trailer file written to:  astrodrizzle.log

Display The Results of the Simulation Side-by-Side

In [12]:
drz_noneq = fits.getdata('nonequalized_sci.fits')
drz_eq = fits.getdata('equalized_sci.fits')

fig, (ax1, ax2) = plt.subplots(ncols=2, figsize=(24, 10))
im1 = ax1.imshow(drz_noneq, cmap='gray', vmin=0.88, vmax=1.08, origin='lower')
ax1.set_title('Original Simulation (Not equalized)')
im2 = ax2.imshow(drz_eq, cmap='gray', vmin=0.88, vmax=1.08, origin='lower')
ax2.set_title('Equalized Simulated Image')

x1 = ax1.get_position().get_points().flatten()[0]
x2 = ax2.get_position().get_points().flatten()[2] - x1
ax_cbar = fig.add_axes([x1, 0, x2, 0.03])
plt.colorbar(im1, cax=ax_cbar, orientation='horizontal')
Out[12]:
<<<<<<< HEAD
<matplotlib.colorbar.Colorbar at 0x7f4ee9d136a0>
=======
<matplotlib.colorbar.Colorbar at 0x7fa0042d5278>
>>>>>>> upstream/gh-pages
<<<<<<< HEAD >>>>>> upstream/gh-pages " >

About this Notebook

Author: M. Cara, STScI Data Analysis Tools Branch
Updated: December 14, 2018